import java.util.Iterator;
import java.util.NoSuchElementException;

public class PointArray implements Iterable<Point>{
  private ArrayList<Point> m_points;
  
  public Iterator<Point> iterator(){
    Iterator<Point> ipoint = m_points.iterator();
    return ipoint;
  }
  PointArray(){
    this.m_points = new ArrayList<Point>();
  }
  PointArray(ArrayList<Point> a_points){
    this.m_points = a_points;
  }
  public void add(Point a_point){
    this.add(a_point);
  }
}


// Messanger Class
public class Point{
  public float x = 0;
  public float y = 0;
  public float z = 0;
  
  Point(float x,float y, float z){
    this.x = x;
    this.y = y;
    this.z = z;
  }
  boolean moved(Point a_point, float a_distance){
    if (this.x < a_point.x-a_distance || this.x > a_point.x+a_distance ) {
      return true;
    }
    if (this.y < a_point.y-a_distance || this.y > a_point.y+a_distance ) {
      return true;
    }
    if (this.z < a_point.z-a_distance || this.z > a_point.z+a_distance ) {
      return true;
    }
    return false;
  }
}
